$(document).ready(function(){
    //scroll chat to end
    if (document.getElementById("scrollbox")!==null) {
        var objDiv = document.getElementById("scrollbox");
        objDiv.scrollTop = objDiv.scrollHeight;
    }
});


